# coding=utf-8

from app.result.api.game import *

from app.dao.api.game import get_list as get_game_list
from app.dao.api.game_item import get_list as get_game_item_list
from app.dao.api.game_category import get_list as get_game_category_list


def show_service():
    try:
        game_list = get_game_list()
        game_item_list = get_game_item_list()
        game_category_list = get_game_category_list()

        data = {"game_list": game_list,
                "game_item_list": game_item_list,
                "game_category_list": game_category_list}
        if not data:
            return show_result(ShowCode.ERROR)
        return show_result(ShowCode.SUCCESS, data)
    except Exception as e:
        print(e)
        return show_result(ShowCode.ERROR)
